# TinyXML_FOUND
# TinyXML_INCLUDE_DIR
# TinyXML_LIBRARY

if (WIN32)
  set(TinyXML_HOME "$ENV{TINYXML_HOME}")
elseif(UNIX)
  set(TinyXML_HOME "")
endif(WIN32)

find_path(TinyXML_INCLUDE_DIR
  NAMES
    tinyxml.h
  PATHS
    ${TinyXML_HOME}
    /usr/local/include
  PATH_SUFFIXES
    include
  DOC
  "Specify the directory containing tinyxml.h."
)

find_library(TinyXML_LIBRARY
  NAMES
    tinyxml
  PATHS
    ${TinyXML_HOME}
    /usr/local/lib
  PATH_SUFFIXES
    lib
  DOC "Specify the location of the tinyxml library here."
)

if (NOT TinyXML_INCLUDE_DIR)
  message(FATAL_ERROR "Can not found TinyXML")
endif()

if (NOT TinyXML_LIBRARY)
  message(FATAL_ERROR "Can not found TinyXML")
endif()

message(STATUS "Found TinyXML headers: " ${TinyXML_INCLUDE_DIR})
message(STATUS "Found TinyXML library: " ${TinyXML_LIBRARY})
set(TinyXML_FOUND TRUE)
